package com.javaee.service.impl;

import com.javaee.dao.TeacherDao;
import com.javaee.entity.Teacher;
import com.javaee.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherDao teacherdao;
    @Override
    public boolean add(Teacher teacher) {

        return teacherdao.add(teacher)>0;
    }

    @Override
    public Teacher getById(int id) {
        return teacherdao.getById(id);
    }
}
